package com.anjiplus.template.gaea.business.modules.opcua.service;

import com.anji.plus.gaea.curd.service.GaeaBaseService;
import com.anjiplus.template.gaea.business.modules.opcua.controller.param.OpcTagValueParam;
import com.anjiplus.template.gaea.business.modules.opcua.dao.entity.OpcTagValue;

import java.util.List;


public interface OpcTagValueService extends GaeaBaseService<OpcTagValueParam, OpcTagValue> {

    @Override
    default OpcTagValue selectOne(String column, Object value) {
        List<OpcTagValue> list = this.list(column, value);
        //重写方法，如果List不为空，则取最新一条记录
        return list.isEmpty() ? null : this.wrapperEntity(list.get(list.size() - 1));
    }
}
